package com.koron.sinoprobe.web.plan.bean.entity;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.koron.sinoprobe.web.common.DeleteFlag;
import com.koron.sinoprobe.web.common.Sortable;
import com.koron.sinoprobe.web.common.UpdateParameter;
import com.koron.sinoprobe.web.plan.excel.SpPlanStringStringConvertor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(description = "专项管理-专项计划")
@ExcelIgnoreUnannotated
public class SpPlan implements Serializable, DeleteFlag, Sortable, UpdateParameter {

    private static final long serialVersionUID = -51117423144103115L;

    @ApiModelProperty("主键")
    private String id;

    @ApiModelProperty("计划包id")
    private String pkgId;

    @ApiModelProperty("计划包编码")
    private String pkgCode;

    @ExcelProperty(value = "项目名称")
    @ApiModelProperty("名称/标题")
    private String name;

    @ApiModelProperty("编号，计划包中的计划编码在计划包审核通过时生成，避免占用编码")
    private String code;

    @ExcelProperty(value = "业务类别", converter = SpPlanStringStringConvertor.class)
    @ApiModelProperty("业务类别: 专项管理.biz_category")
    private String bizCategory;

    @ExcelProperty(value = "项目类别", converter = SpPlanStringStringConvertor.class)
    @ApiModelProperty("项目类别：专项管理.sp_project_category")
    private String projectType;

    @ExcelProperty(value = "专业", converter = SpPlanStringStringConvertor.class)
    @ApiModelProperty("计划专业：专项管理.sp_major_category")
    private String major;

    @ApiModelProperty("计划来源，专项管理.plan_source")
    private String planSource;

    @ExcelProperty(value = "重要等级", converter = SpPlanStringStringConvertor.class)
    @ApiModelProperty("重要等级：专项管理.important_level")
    private String importantLevel;

    @ApiModelProperty("主办部门id")
    private String hostDeptId;

    @ExcelProperty(value = "主办部门")
    @ApiModelProperty("主办部门名称")
    private String hostDeptName;

    @ApiModelProperty("主办单位id")
    private String hostOrgId;

    @ExcelProperty(value = "主办单位")
    @ApiModelProperty("主办单位名称")
    private String hostOrgName;

    @ExcelProperty(value = "计划开始时间")
    @ApiModelProperty("计划开始时间，yyyy-mm-dd")
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    private Date predictStartTime;

    @ExcelProperty(value = "计划完成时间")
    @ApiModelProperty("计划完成时间，yyyy-mm-dd")
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    private Date predictFinishTime;

    @ApiModelProperty("验收标准（已废弃），这里作为是否滞后使用 sp_progress_status")
    private String acceptCriteria;

    @ApiModelProperty("项目内容概述")
    private String contentOverview;

    @ExcelProperty(value = "是否团队", converter = SpPlanStringStringConvertor.class)
    @ApiModelProperty("是否团队")
    private Integer isTeam;

    @ApiModelProperty("负责人id")
    private String leader;

    @ExcelProperty(value = "负责人")
    @ApiModelProperty("负责人名字")
    private String leaderName;

    @ExcelProperty(value = "是否计划内", converter = SpPlanStringStringConvertor.class)
    @ApiModelProperty("是否计划内")
    private Integer isExpected;

    @ExcelProperty(value = "预算金额（元）")
    @ApiModelProperty("计划预算资金,单位：元，最大长度11，2位小数")
    private BigDecimal budget;

    @ExcelProperty(value = "预算类型", converter = SpPlanStringStringConvertor.class)
    @ApiModelProperty("预算类型，字典：budget_type")
    private String budgetType;

    @ApiModelProperty("计划状态：专项管理.sp_plan_status")
    private String status;

    @ApiModelProperty("协作状态, 字典：plan_assist_status，同步、异步")
    private String assistStatus;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("必要性")
    private String necessity;

    @ApiModelProperty("可行性")
    private String feasibility;

    @ApiModelProperty("顺序")
    private Integer sort;

    @ApiModelProperty(value = "创建人账号")
    private String createBy;

    @ApiModelProperty(value = "创建人姓名")
    private String createByName;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新人账号")
    private String updateBy;

    @ApiModelProperty(value = "更新人姓名")
    private String updateByName;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty("创建部门")
    private String deptId;

    @JsonIgnore
    @ApiModelProperty(value = "删除标志", hidden = true)
    private Boolean deleteFlag;

    @ExcelProperty(value = "所属年份")
    private String belongYear;
}
